<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<!--Generated on Mon Oct 27 10:49:29 2014 by LaTeXML (version 0.7.999_04) http://dlmf.nist.gov/LaTeXML/.-->

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../../../LaTeXML.css" type="text/css">
<link rel="stylesheet" href="../../../../../../ltx-article.css" type="text/css">
<link rel="stylesheet" href="../../../../../../customRules.css" type="text/css">
</head>
<body>
<div class="ltx_page_main">
<div class="ltx_page_content">
<div class="ltx_document">
<div id="Sx1" class="ltx_section">
<h1 class="ltx_title ltx_title_section">Lateral drift correction</h1>

<div id="Sx1.p1" class="ltx_para">
<p class="ltx_p">Long time-series data acquisitions usually suffer from sample drift.
ThunderSTORM supports two methods for lateral drift correction. The
first is based on tracking fiducial markers inserted into the sample,
and the second on cross-correlation of similar structures in reconstructed
super-resolution images. The trajectory of the relative sample drift
can be saved to a file and applied later, possibly to a different
dataset. For example, drift estimated from a sub-region of the data
can be applied to the whole dataset, or drift estimated from one channel
can be applied to correct drift in another channel.</p>
</div>
<div id="Sx1.SSx1" class="ltx_subsection">
<h2 class="ltx_title ltx_title_subsection">Fiducial markers</h2>

<div id="Sx1.SSx1.p1" class="ltx_para">
<p class="ltx_p">A common approach for correcting drift is performed by tracking fiducial
markers present in the sample and then subtracting their relative
motion from the molecular localizations. ThunderSTORM can identify
fiducial markers automatically from the localization results as molecules
that stay in the ‘‘on’’ state at one position for a substantial
amount of time. Therefore, all localizations that arise from more
than a user-specified number of frames are considered as fiducial
markers and are used for the drift correction. Assigning molecular
localizations in subsequent frames to a single fiducial marker is
performed by the <a href="ResultsGrouping.html" title="" class="ltx_ref">merging algorithm</a>.</p>
</div>
<div id="Sx1.SSx1.p2" class="ltx_para">
<p class="ltx_p">The sample drift is obtained by averaging the relative trajectories
of all identified fiducial markers into a single trajectory. The sample
drift at each frame <img id="Sx1.SSx1.p2.m1" class="ltx_Math" style="vertical-align:-5px" src="mi/mi10.png" width="95" height="19" alt="t=1,\ldots,T">, is computed (for <img id="Sx1.SSx1.p2.m2" class="ltx_Math" style="vertical-align:-2px" src="mi/mi12.png" width="14" height="12" alt="x"> and <img id="Sx1.SSx1.p2.m3" class="ltx_Math" style="vertical-align:-5px" src="mi/mi14.png" width="13" height="15" alt="y">)
according to the formula</p>
<table id="Sx1.E1" class="ltx_equation">

<tr class="ltx_equation ltx_align_baseline">
<td class="ltx_eqn_pad"></td>
<td class="ltx_align_center"><img id="Sx1.E1.m1" class="ltx_Math" style="vertical-align:-25px" src="mi/mi2.png" width="184" height="58" alt="\overline{x}_{t}=\frac{1}{M}\sum_{i=1}^{M}\left(x_{i,t}-\theta_{i}\right)\,."></td>
<td class="ltx_eqn_pad"></td>
<td rowspan="1" class="ltx_align_middle ltx_align_right"><span class="ltx_tag ltx_tag_equation">(1)</span></td>
</tr>
</table>
<p class="ltx_p">Here <img id="Sx1.SSx1.p2.m4" class="ltx_Math" style="vertical-align:-2px" src="mi/mi3.png" width="23" height="16" alt="M"> is the number of fiducial markers, <img id="Sx1.SSx1.p2.m5" class="ltx_Math" style="vertical-align:-7px" src="mi/mi13.png" width="30" height="17" alt="x_{i,t}"> is the absolute
position of the <img id="Sx1.SSx1.p2.m6" class="ltx_Math" style="vertical-align:-2px" src="mi/mi7.png" width="10" height="16" alt="i">-th marker at frame <img id="Sx1.SSx1.p2.m7" class="ltx_Math" style="vertical-align:-2px" src="mi/mi11.png" width="11" height="15" alt="t">, <img id="Sx1.SSx1.p2.m8" class="ltx_Math" style="vertical-align:-5px" src="mi/mi6.png" width="100" height="19" alt="i=1,\ldots,M">, and
<img id="Sx1.SSx1.p2.m9" class="ltx_Math" style="vertical-align:-5px" src="mi/mi5.png" width="18" height="19" alt="\theta_{i}"> is an unknown offset which has to be subtracted from
the absolute marker position to obtain the relative position.</p>
</div>
<div id="Sx1.SSx1.p3" class="ltx_para">
<p class="ltx_p">The offset <img id="Sx1.SSx1.p3.m1" class="ltx_Math" style="vertical-align:-5px" src="mi/mi5.png" width="18" height="19" alt="\theta_{i}"> is estimated by least squares minimization
of the sum of squared differences between the relative marker positions
and the relative sample drift, summed over all markers and frames.
The optimization is defined by the formula</p>
<table id="Sx1.E2" class="ltx_equation">

<tr class="ltx_equation ltx_align_baseline">
<td class="ltx_eqn_pad"></td>
<td class="ltx_align_center"><img id="Sx1.E2.m1" class="ltx_Math" style="vertical-align:-25px" src="mi/mi1.png" width="323" height="58" alt="\hat{\boldsymbol{\theta}}=\argmin_{\boldsymbol{\theta}=\left[\theta_{1},\ldots%
,\theta_{M}\right]}\sum_{t=1}^{T}\sum_{i=1}^{M}\left(\left(x_{i,t}-\theta_{i}%
\right)-\overline{x}_{t}\right)^{2}\,,"></td>
<td class="ltx_eqn_pad"></td>
<td rowspan="1" class="ltx_align_middle ltx_align_right"><span class="ltx_tag ltx_tag_equation">(2)</span></td>
</tr>
</table>
<p class="ltx_p">where <img id="Sx1.SSx1.p3.m2" class="ltx_Math" style="vertical-align:-14px" src="mi/mi4.png" width="134" height="35" alt="\hat{\boldsymbol{\theta}}=\left[\hat{\theta}_{1},\ldots,\hat{\theta}_{M}\right]">
are the values of the estimated offset for each of the markers.</p>
</div>
<div id="Sx1.SSx1.p4" class="ltx_para">
<p class="ltx_p">In reality, some of the points <img id="Sx1.SSx1.p4.m1" class="ltx_Math" style="vertical-align:-7px" src="mi/mi13.png" width="30" height="17" alt="x_{i,t}"> may be missing because the
markers might not be localized in some frames. If this is the case,
the relative sample drift in Equation (<a href="#Sx1.E1" title="(1) ‣ Fiducial markers ‣ Lateral drift correction" class="ltx_ref"><span class="ltx_text ltx_ref_tag">1</span></a>)
is computed only from the corresponding number of fiducial markers.
For the missing markers, the corresponding sum of squared differences
in Equation (<a href="#Sx1.E2" title="(2) ‣ Fiducial markers ‣ Lateral drift correction" class="ltx_ref"><span class="ltx_text ltx_ref_tag">2</span></a>) is set to zero.</p>
</div>
<div id="Sx1.SSx1.p5" class="ltx_para">
<p class="ltx_p">The final drift trajectory is smoothed by robust locally weighted
regression <cite class="ltx_cite">[<a href="#bib.bib5" title="Robust Locally Weighted Regression and Smoothing Scatterplots" class="ltx_ref">1</a>]</cite>. Users can specify the maximum merging
distance and the minimum number of frames in which a molecule must
appear to be considered as a fiducial marker, and the trajectory smoothing
factor.</p>
</div>
<div id="Sx1.SSx1.p6" class="ltx_para">
<p class="ltx_p">Note that analyzing samples with fiducial markers yields localizations
of both the blinking fluorophores and the fiducial markers. This may
slow down the merging algorithm used for automatic identification
of the markers. For faster marker identification, the merging process
can be limited to regions containing only the fiducial markers. The
drift trajectory can then be saved to a file and applied later to
the whole dataset.</p>
</div>
<div id="Sx1.SSx1.SSSx1" class="ltx_subsubsection">
<h3 class="ltx_title ltx_title_subsubsection">Guidelines for the choice of parameters</h3>

<div id="Sx1.SSx1.SSSx1.p1" class="ltx_para">
<p class="ltx_p">Fiducial markers are automatically detected as molecules that stay
in the “on” state at one position
for a substantial amount of time. The lateral tolerance for identification
of a marker is controlled by the setting “Max distance”.
The parameter “Min marker visibility ratio”
controls the fraction of frames wherein the molecule must be detected
to be considered as a fiducial marker. The ratio should be set higher
than the longest “on” state for
a regular blinking molecule. Values higher than 0.5 might not work
due to possibility of missed detections. “Trajectory
smoothing factor” controls smoothness of the drift
trajectory and ranges from 0 (no smoothing) to 1 (highest smoothing).
Note that analyzing samples with fiducial markers yields localizations
of both the blinking fluorophores and the fiducial markers. This may
slow down the merging algorithm used for automatic identification
of the markers. For faster marker identification, the merging process
can be limited to regions containing only the fiducial markers. The
drift trajectory can then be saved to a file and applied later to
the whole dataset.</p>
</div>
</div>
</div>
<div id="Sx1.SSx2" class="ltx_subsection">
<h2 class="ltx_title ltx_title_subsection">Cross-correlation</h2>

<div id="Sx1.SSx2.p1" class="ltx_para">
<p class="ltx_p">ThunderSTORM also supports lateral drift correction using the method
of Mlodzianoski et al. <cite class="ltx_cite">[<a href="#bib.bib22" title="Sample drift correction in 3D fluorescence photoactivation localization microscopy" class="ltx_ref">2</a>]</cite>. Here, the list
of localized molecules is split into <img id="Sx1.SSx2.p1.m1" class="ltx_Math" style="vertical-align:-3px" src="mi/mi8.png" width="45" height="17" alt="n+1"> batches based on the frame
in which they appeared. Each batch is used to create one super-resolution
image. The presumption of this method is that similar structures will
appear in all reconstructed images. Cross-correlation methods are
used to determine the shift between the first image and each of the
subsequent images. This leads to <img id="Sx1.SSx2.p1.m2" class="ltx_Math" style="vertical-align:-2px" src="mi/mi9.png" width="15" height="12" alt="n"> cross-correlation images, where
the shift in the position caused by the drift corresponds to the relative
position between the global intensity maximum peaks. The localized
peaks are assigned to the central frame of each batch sequence and
the drift for intermediate frames is determined by local regression
using third degree polynomials. The original molecular coordinates
are corrected for drift using the estimated values.</p>
</div>
<div id="Sx1.SSx2.p2" class="ltx_para">
<p class="ltx_p">In our implementation, super-resolution images are created by the
<a href="../rendering/ui/ASHRenderingUI.html" title="" class="ltx_ref">average shifted histograms</a>
method described in Section <span class="ltx_ref ltx_ref_self">LABEL:sub:Averaged-shifted-histograms</span>,
cross-correlation images are computed by Fast Fourier Transform methods
as implemented in ImageJ, and the location of global intensity maximum
peaks is determined with sub-pixel precision using the <a href="../estimators/ui/RadialSymmetryEstimatorUI.html" title="" class="ltx_ref">radial symmetry</a>
method described in Section <span class="ltx_ref ltx_ref_self">LABEL:sub:Radial-symmetry</span>. The number
of batches <img id="Sx1.SSx2.p2.m1" class="ltx_Math" style="vertical-align:-2px" src="mi/mi9.png" width="15" height="12" alt="n"> and the magnification of super-resolution images is
defined by users. For better stability of the solution, intensity
maximum peaks are first localized in cross-correlation images computed
from reconstructed images with a magnification of one. The peak position
is refined afterwards using cross-correlation images computed from
super-resolution images with a user specified magnification. The final
position of the peak is obtained as a local intensity maximum in close
proximity to the peak obtained at lower magnification.</p>
</div>
<div id="Sx1.SSx2.SSSx1" class="ltx_subsubsection">
<h3 class="ltx_title ltx_title_subsubsection">Guidelines for the choice of parameters</h3>

<div id="Sx1.SSx2.SSSx1.p1" class="ltx_para">
<p class="ltx_p">The parameter “Number of bins”
controls the time resolution of the drift trajectory by splitting
the image sequence into an appropriate number of bins. Molecular localizations
from each bin are used to reconstruct one super-resolution image.
“Magnification” controls the
lateral resolution of the drift trajectory through the magnification
of the reconstructed images. A small number of localized molecules
requires a smaller number of bins so that there will be enough data
in each sub-sequence. This decreases the time resolution of the drift
estimation. A smaller magnification setting can also help to obtain
resolvable peaks in cross-correlation images created from images with
less data or with unclear structures. Cross-correlation images with
detected peaks can be viewed by checking the "Show cross-correlations"
checkbox.</p>
</div>
</div>
</div>
<div id="Sx1.SSx3" class="ltx_subsection">
<h2 class="ltx_title ltx_title_subsection">See also</h2>

<div id="Sx1.SSx3.p1" class="ltx_para">
<ul id="I1" class="ltx_itemize">
<li id="I1.i1" class="ltx_item" style="list-style-type:none;">
<span class="ltx_tag ltx_tag_itemize">•</span> 
<div id="I1.i1.p1" class="ltx_para">
<p class="ltx_p"><a href="Postprocessing.html" title="" class="ltx_ref">Post-processing analysis</a></p>
</div>
</li>
</ul>
</div>
</div>
</div>
<div id="bib" class="ltx_bibliography">
<h1 class="ltx_title ltx_title_bibliography">References</h1>

<ul id="L1" class="ltx_biblist">
<li id="bib.bib5" class="ltx_bibitem ltx_bib_article">
<span class="ltx_bibtag ltx_bib_key ltx_role_refnum">[1]</span>
<span class="ltx_bibblock"><span class="ltx_text ltx_bib_author">W. S. Cleveland</span><span class="ltx_text ltx_bib_year">(1979)</span>
</span>
<span class="ltx_bibblock"><span class="ltx_text ltx_bib_title">Robust Locally Weighted Regression and Smoothing Scatterplots</span>,
</span>
<span class="ltx_bibblock"><span class="ltx_text ltx_bib_journal">Journal of the American Statistical Association</span> <span class="ltx_text ltx_bib_volume">74</span> (<span class="ltx_text ltx_bib_number">368</span>), <span class="ltx_text ltx_bib_pages"> pp. 829–836</span>.
</span>
<span class="ltx_bibblock">External Links: <span class="ltx_text ltx_bib_links"><a href="http://dx.doi.org/10.2307/2286407" title="" class="ltx_ref doi ltx_bib_external">Document</a></span>.
</span>
<span class="ltx_bibblock ltx_bib_cited">Cited by: <a href="#Sx1.SSx1.p5" title="Fiducial markers ‣ Lateral drift correction" class="ltx_ref"><span class="ltx_text ltx_ref_title">Fiducial markers</span></a>.
</span>
</li>
<li id="bib.bib22" class="ltx_bibitem ltx_bib_article">
<span class="ltx_bibtag ltx_bib_key ltx_role_refnum">[2]</span>
<span class="ltx_bibblock"><span class="ltx_text ltx_bib_author">M. J. Mlodzianoski, J. M. Schreiner, S. P. Callahan, K. Smolková, A. Dlasková, J. Santorová, P. Ježek and J. Bewersdorf</span><span class="ltx_text ltx_bib_year">(2011)</span>
</span>
<span class="ltx_bibblock"><span class="ltx_text ltx_bib_title">Sample drift correction in 3D fluorescence photoactivation localization microscopy</span>,
</span>
<span class="ltx_bibblock"><span class="ltx_text ltx_bib_journal">Optics Express</span> <span class="ltx_text ltx_bib_volume">19</span> (<span class="ltx_text ltx_bib_number">16</span>), <span class="ltx_text ltx_bib_pages"> pp. 15009–19</span>.
</span>
<span class="ltx_bibblock">External Links: <span class="ltx_text ltx_bib_links"><a href="http://dx.doi.org/10.1364/OE.19.015009" title="" class="ltx_ref doi ltx_bib_external">Document</a></span>.
</span>
<span class="ltx_bibblock ltx_bib_cited">Cited by: <a href="#Sx1.SSx2.p1" title="Cross-correlation ‣ Lateral drift correction" class="ltx_ref"><span class="ltx_text ltx_ref_title">Cross-correlation</span></a>.
</span>
</li>
</ul>
</div>
</div>
</div>
<div class="ltx_page_footer">
<div class="ltx_page_logo">Generated  on Mon Oct 27 10:49:29 2014 by <a href="http://dlmf.nist.gov/LaTeXML/">LaTeXML <img src="" alt="[LOGO]"></a>
</div>
</div>
</div>
</body>
</html>
